<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
	<td height="10" colspan="3"></td>
</tr>
<tr>
	<td valign="top">
        <div class='listmoduleleft'>
		  <?php echo $categoriesNewsRoot ?>
        </div>
	</td>
	<td width="78%" style="border-left:1px solid #dddddd;" valign="top">
    <?php
    if(count($categories) >0)
    {
    ?>
    <form name="form_admin" method="post" action="<?php echo formAction('updatestatus')?>">
    <table width="100%"  cellpadding="4" cellspacing="1" id="tblsort">
    	<tr class="headtb" nodrop="true" nodrag="true">
    		<td width="5%" ><?php echo _ORDER?></td>
            <td width="5%"><?php echo inputCheckAll()?></td>
    		<td width="20%" >Category Name</td>
    		<td width="10%" ><?php echo _STATUS?></td>
    		<td width="20%" ><?php echo _ACTIONS?></td>
    		<td>&nbsp;</td>
    	</tr>
        <?php
    	foreach($categories as $i => $category)
    	{
    	?>
    		<tr>
    			<td align="center">
    				<input class="ordertext" id="listorder_<?php echo $i?>" name="listorder[]"
    				value="<?php echo getOrderList($i)?>"/>
    			</td>
                <td align="center"><?php echo inputCheck($category['iId'])?></td>
    			<td nowrap="nowrap" style="padding-left:10px" valign="middle">
                    <?php echo linkAction('edit',$category['cName'],'id='.$category["iId"])?>
    				<input type="hidden" name="listid[]" value="<?php echo $category['iId']?>" />
    			</td>
    			<td align="center">
    				<select id="liststatus_<?php echo $i?>" name="liststatus[]">
    					<?php echo liststatus($category["iStatus"]) ?>
    				</select>
    			</td>

    			<td align="center">
    				<?php echo linkAction('edit',_EDIT,'id='.$category["iId"])?> -
                    <?php echo linkAction('delete',_DELETE,'id='.$category["iId"])?>
    			</td>
    			<td></td>
    		</tr>
    	<?php
    	}
        ?>
     </table>
    <?php
    }else
    {
    ?>
    <form name="form_admin" method="post" action="<?php echo formAction('updatestatuscontent')?>">
    <table width="100%"  cellpadding="4" cellspacing="1" id="tblsort">
    	<tr class="headtb" nodrop="true" nodrag="true">
    		<td width="5%" ><?php echo _ORDER?></td>
            <td width="5%"><?php echo inputCheckAll()?></td>
    		<td width="20%" >Content Name</td>
    		<td width="10%" ><?php echo _STATUS?></td>
    		<td width="20%" ><?php echo _ACTIONS?></td>
    		<td>&nbsp;</td>
    	</tr>
        <?php

        if(!is_array($contents))$contents=array();
    	foreach($contents as $i => $content)
    	{
    	?>
    	<tr>
    		<td align=center>
    			<input class="ordertext" id="listorder_<?php echo $i?>" name="listorder[]"
    			value="<?php echo getOrderList($i)?>">
    		</td>
            <td align="center"><?php echo inputCheck($content['iId'])?></td>
    		<td nowrap="nowrap">
                <?php echo linkAction('editcontent',$content["cName"],'id='.$content["iId"])?>
    		      <input type="hidden" name="listid[]" value="<?php echo $content["iId"]?>" />
    		</td>
    		<td align=center>
    			<select name="liststatus[]" id="iStatus_content_<?php echo $i ?>">
    				<?php echo  liststatus($content["iStatus"]);?>
    			</select>
    		</td>

    		<td align=center>
    			<?php echo linkAction('editcontent',_EDIT,'id='.$content["iId"])?> -
                <?php echo linkAction('delcontent',_DELETE,'id='.$content["iId"])?>
    		</td>
    		<td></td>
    		</tr>
    	<?php
    	}
        if(count($contents)==0)
        {
        ?>
        <tr>
             <td align="center" colspan="5">
                <font color="Red"><?php echo _NOTFOUNDCONTENT?></font>
            </td>
        </tr>
        <script>showhide('applybut');showhide("delbut");</script>
        <?php
        }
    	?>
        </table>
    <?php
    }
    ?>
    <?php echo $show_page?>
	</td>
</tr>
</table>

<script type="text/javascript">
(new TableDnD).init("tblsort");
</script>
